package com.ruoyi.common.core.domain.user;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户对象(相印用户)
 * @author ruoyi
 * @date 2025-05-28
 */
public class User extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户编号 */
    private String id;

    /** 用户名 */
    @Excel(name = "用户名")
    private String username;

    /** 手机号码 */
    @Excel(name = "手机号码")
    private String phone;

    /** 性别 */
    @Excel(name = "性别")
    private Long gender;

    /** 注册时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "注册时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date registerTime;

    /** 账户余额 */
    @Excel(name = "账户余额")
    private BigDecimal balance;

    /** 头像路径 */
    @Excel(name = "头像路径")
    private String avatar;

    /** 微信开放ID */
    @Excel(name = "微信开放ID")
    private String openid;

    /** 末次登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "末次登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastLogin;

    /** 会员状态 */
    @Excel(name = "会员状态")
    private Integer isVip;

    /** 上一次登入时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上一次登入时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastLoginTime;



    /** 用户地址表*/
    private List<Address> addressList;


    public List<Address> getAddressList() {
        return addressList;
    }

    public void setAddressList(List<Address> addressList) {
        this.addressList = addressList;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }

    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }

    public void setGender(Long gender) 
    {
        this.gender = gender;
    }

    public Long getGender() 
    {
        return gender;
    }

    public void setRegisterTime(Date registerTime) 
    {
        this.registerTime = registerTime;
    }

    public Date getRegisterTime() 
    {
        return registerTime;
    }

    public void setBalance(BigDecimal balance) 
    {
        this.balance = balance;
    }

    public BigDecimal getBalance() 
    {
        return balance;
    }

    public void setAvatar(String avatar) 
    {
        this.avatar = avatar;
    }

    public String getAvatar() 
    {
        return avatar;
    }

    public void setOpenid(String openid) 
    {
        this.openid = openid;
    }

    public String getOpenid() 
    {
        return openid;
    }

    public void setLastLogin(Date lastLogin) 
    {
        this.lastLogin = lastLogin;
    }

    public Date getLastLogin() 
    {
        return lastLogin;
    }

    public void setIsVip(Integer isVip) 
    {
        this.isVip = isVip;
    }

    public Integer getIsVip() 
    {
        return isVip;
    }

    public void setLastLoginTime(Date lastLoginTime) 
    {
        this.lastLoginTime = lastLoginTime;
    }

    public Date getLastLoginTime() 
    {
        return lastLoginTime;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("phone", getPhone())
            .append("gender", getGender())
            .append("registerTime", getRegisterTime())
            .append("balance", getBalance())
            .append("avatar", getAvatar())
            .append("openid", getOpenid())
            .append("lastLogin", getLastLogin())
            .append("isVip", getIsVip())
            .append("lastLoginTime", getLastLoginTime())
            .toString();
    }
}
